import 'package:flutter/material.dart';

class BaseDialog extends StatelessWidget {
  final Alignment alignment;

  BaseDialog({Key key, this.alignment}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Dialog(
      child: Container(
        width: double.infinity,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [Container(
            padding: EdgeInsets.symmetric(vertical: 10),
              child: Text(
                "标题",
                style: TextStyle(color: Colors.grey[700], fontSize: 17),
              ),
            )],
        ),

      ),
    );
    // return Container(
    //   width: double.infinity,
    //   height: 100,
    //   margin: EdgeInsets.all(20),
    //   decoration: BoxDecoration(
    //     borderRadius: BorderRadius.circular(12),
    //     color: Colors.white
    //   ),
    //   // constraints: BoxConstraints(maxHeight: 100),
    //   // child: Column(
    //   //   children: [
    //   //     Container(
    //   //
    //   //     )
    //   //   ],
    //   // ),
    // );
  }

  void show(BuildContext context) {
    // AlertDialog()
    showDialog(
        context: context,
        barrierDismissible: false,
        builder: (BuildContext context) {
          return BaseDialog(
            // alignment: Alignment.center,
          );
        });
  }
}
